home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM A / PD-ROM A.iso / HyperCard / Education / Weights & Measures / card_7936.txt < prev    next >
Encoding:
Text File  |  1991-10-27  |  11.3 KB  |  534 lines

  1. -- card: 7936 from stack: in
  2. -- bmap block id: 7700
  3. -- flags: 4000
  4. -- background id: 2785
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on calculate
  8.   global g,fa,fb,fc,sg,e
  9.   set lockscreen to true
  10.   put 0 into w
  11.   put g into card field fa
  12.   if g = 0 then put 200 into w
  13.   if g = 15 then put 45 into w
  14.   if g>0 and g<15 then put 190-(10*g) into w
  15.   if g>15 and g<21 then put 104-(4*g) into w
  16.   if g>20 and g<27 then put 64-(2*g) into w
  17.   if g>26 and g<32 then put 38-g into w
  18.   if g>31 and g<37 then put 22.5-(.5*g) into w
  19.   if g>36 and g<41 then put 13.5-(.25*g) into w
  20.   if g>40 and g<45 then put 8.5-(.125*g) into w
  21.   if g>44 or g<0 then put 0 into w
  22.   if round(g)<>g then put 0 into w
  23.   if w=0 then
  24.     put "Error" into  card field fb
  25.     put "Error" into  card field fc
  26.   end if
  27.   if w<>0 then
  28.     set numberformat to "0"
  29.     --put g into card field fa
  30.     set numberformat to "0.0000"
  31.     put (w+e)*12/(sg*16)&"  in" into card field fb
  32.     set numberformat to "0.000"
  33.     put (w+e)*12*25.4/(sg*16)&"  mm" into card field fc
  34.   end if
  35.   set lockscreen to false
  36. end calculate
  37.  
  38.  
  39. -- part 1 (button)
  40. -- low flags: 00
  41. -- high flags: A002
  42. -- rect: left=73 top=117 right=142 bottom=136
  43. -- title width / last selected line: 0
  44. -- icon id / first selected line: 0 / 0
  45. -- text alignment: 1
  46. -- font id: 0
  47. -- text size: 12
  48. -- style flags: 0
  49. -- line height: 16
  50. -- part name: Gage
  51. ----- HyperTalk script -----
  52. on mouseUp
  53.   global g,fa,fb,fc,sg,e
  54.   put 0 into e
  55.   put 1 into fa
  56.   put 2 into fb
  57.   put 3 into fc
  58.   put 480 into sg
  59.   ask "Enter Gage"
  60.   put it into g
  61.   calculate
  62. end mouseUp
  63.  
  64.  
  65.  
  66. -- part 2 (field)
  67. -- low flags: 01
  68. -- high flags: 0002
  69. -- rect: left=73 top=141 right=160 bottom=136
  70. -- title width / last selected line: 0
  71. -- icon id / first selected line: 0 / 0
  72. -- text alignment: 1
  73. -- font id: 0
  74. -- text size: 12
  75. -- style flags: 0
  76. -- line height: 16
  77. -- part name: 
  78.  
  79.  
  80. -- part 35 (field)
  81. -- low flags: 01
  82. -- high flags: 0002
  83. -- rect: left=25 top=160 right=180 bottom=99
  84. -- title width / last selected line: 0
  85. -- icon id / first selected line: 0 / 0
  86. -- text alignment: 1
  87. -- font id: 0
  88. -- text size: 12
  89. -- style flags: 0
  90. -- line height: 16
  91. -- part name: 
  92.  
  93.  
  94. -- part 53 (button)
  95. -- low flags: 00
  96. -- high flags: 0000
  97. -- rect: left=141 top=121 right=137 bottom=158
  98. -- title width / last selected line: 0
  99. -- icon id / first selected line: 0 / 0
  100. -- text alignment: 1
  101. -- font id: 0
  102. -- text size: 12
  103. -- style flags: 0
  104. -- line height: 16
  105. -- part name: 
  106.  
  107.  
  108. -- part 36 (field)
  109. -- low flags: 01
  110. -- high flags: 0002
  111. -- rect: left=111 top=160 right=180 bottom=189
  112. -- title width / last selected line: 0
  113. -- icon id / first selected line: 0 / 0
  114. -- text alignment: 1
  115. -- font id: 0
  116. -- text size: 12
  117. -- style flags: 0
  118. -- line height: 16
  119. -- part name: 
  120.  
  121.  
  122. -- part 54 (button)
  123. -- low flags: 00
  124. -- high flags: 0000
  125. -- rect: left=169 top=122 right=138 bottom=186
  126. -- title width / last selected line: 0
  127. -- icon id / first selected line: 0 / 0
  128. -- text alignment: 1
  129. -- font id: 0
  130. -- text size: 12
  131. -- style flags: 0
  132. -- line height: 16
  133. -- part name: 
  134.  
  135.  
  136. -- part 37 (button)
  137. -- low flags: 00
  138. -- high flags: A002
  139. -- rect: left=70 top=255 right=280 bottom=133
  140. -- title width / last selected line: 0
  141. -- icon id / first selected line: 0 / 0
  142. -- text alignment: 1
  143. -- font id: 0
  144. -- text size: 12
  145. -- style flags: 0
  146. -- line height: 16
  147. -- part name: Gage
  148. ----- HyperTalk script -----
  149. on mouseUp
  150.   global g,fa,fb,fc,sg,e
  151.   put 0 into e
  152.   put 4 into fa
  153.   put 5 into fb
  154.   put 6 into fc
  155.   put 489.6 into sg
  156.   ask "Enter Gage"
  157.   put it into g
  158.   calculate
  159. end mouseUp
  160.  
  161.  
  162.  
  163. -- part 38 (field)
  164. -- low flags: 01
  165. -- high flags: 0002
  166. -- rect: left=70 top=279 right=298 bottom=133
  167. -- title width / last selected line: 0
  168. -- icon id / first selected line: 0 / 0
  169. -- text alignment: 1
  170. -- font id: 0
  171. -- text size: 12
  172. -- style flags: 0
  173. -- line height: 16
  174. -- part name: 
  175.  
  176.  
  177. -- part 39 (field)
  178. -- low flags: 01
  179. -- high flags: 0002
  180. -- rect: left=24 top=298 right=318 bottom=98
  181. -- title width / last selected line: 0
  182. -- icon id / first selected line: 0 / 0
  183. -- text alignment: 1
  184. -- font id: 0
  185. -- text size: 12
  186. -- style flags: 0
  187. -- line height: 16
  188. -- part name: 
  189.  
  190.  
  191. -- part 40 (field)
  192. -- low flags: 01
  193. -- high flags: 0002
  194. -- rect: left=111 top=298 right=318 bottom=189
  195. -- title width / last selected line: 0
  196. -- icon id / first selected line: 0 / 0
  197. -- text alignment: 1
  198. -- font id: 0
  199. -- text size: 12
  200. -- style flags: 0
  201. -- line height: 16
  202. -- part name: 
  203.  
  204.  
  205. -- part 55 (button)
  206. -- low flags: 00
  207. -- high flags: 0000
  208. -- rect: left=141 top=263 right=279 bottom=158
  209. -- title width / last selected line: 0
  210. -- icon id / first selected line: 0 / 0
  211. -- text alignment: 1
  212. -- font id: 0
  213. -- text size: 12
  214. -- style flags: 0
  215. -- line height: 16
  216. -- part name: 
  217.  
  218.  
  219. -- part 56 (button)
  220. -- low flags: 00
  221. -- high flags: 0000
  222. -- rect: left=180 top=261 right=277 bottom=197
  223. -- title width / last selected line: 0
  224. -- icon id / first selected line: 0 / 0
  225. -- text alignment: 1
  226. -- font id: 0
  227. -- text size: 12
  228. -- style flags: 0
  229. -- line height: 16
  230. -- part name: 
  231.  
  232.  
  233. -- part 41 (button)
  234. -- low flags: 00
  235. -- high flags: A002
  236. -- rect: left=371 top=116 right=141 bottom=434
  237. -- title width / last selected line: 0
  238. -- icon id / first selected line: 0 / 0
  239. -- text alignment: 1
  240. -- font id: 0
  241. -- text size: 12
  242. -- style flags: 0
  243. -- line height: 16
  244. -- part name: Gage
  245. ----- HyperTalk script -----
  246. on mouseUp
  247.   global g,fa,fb,fc,sg,e
  248.   put 2.5 into e
  249.   put 7 into fa
  250.   put 8 into fb
  251.   put 9 into fc
  252.   put 489.6 into sg
  253.   ask "Enter Gage"
  254.   put it into g
  255.   calculate
  256. end mouseUp
  257.  
  258.  
  259.  
  260. -- part 57 (button)
  261. -- low flags: 00
  262. -- high flags: 0000
  263. -- rect: left=439 top=123 right=139 bottom=456
  264. -- title width / last selected line: 0
  265. -- icon id / first selected line: 0 / 0
  266. -- text alignment: 1
  267. -- font id: 0
  268. -- text size: 12
  269. -- style flags: 0
  270. -- line height: 16
  271. -- part name: 
  272.  
  273.  
  274. -- part 58 (button)
  275. -- low flags: 00
  276. -- high flags: 0000
  277. -- rect: left=467 top=123 right=139 bottom=484
  278. -- title width / last selected line: 0
  279. -- icon id / first selected line: 0 / 0
  280. -- text alignment: 1
  281. -- font id: 0
  282. -- text size: 12
  283. -- style flags: 0
  284. -- line height: 16
  285. -- part name: 
  286.  
  287.  
  288. -- part 42 (button)
  289. -- low flags: 00
  290. -- high flags: A002
  291. -- rect: left=377 top=254 right=279 bottom=440
  292. -- title width / last selected line: 0
  293. -- icon id / first selected line: 0 / 0
  294. -- text alignment: 1
  295. -- font id: 0
  296. -- text size: 12
  297. -- style flags: 0
  298. -- line height: 16
  299. -- part name: Gage
  300. ----- HyperTalk script -----
  301. on mouseUp
  302.   put 0 into w
  303.   ask "Enter Gage"
  304.   put it into g
  305.   put g into card field 10
  306.   if g=0 then put ..3249 into w
  307.   if g=1 then put .2893 into w
  308.   if g=2 then put .2576 into w
  309.   if g=3 then put .2294 into w
  310.   if g=4 then put .2043 into w
  311.   if g=5 then put .1819 into w
  312.   if g=6 then put .1620 into w
  313.   if g=7 then put .1443 into w
  314.   if g=8 then put .1285 into w
  315.   if g=9 then put .1144 into w
  316.   if g=10 then put .1019 into w
  317.   if g=11 then put .0907 into w
  318.   if g=12 then put .0808 into w
  319.   if g=13 then put .0720 into w
  320.   if g=14 then put .0641 into w
  321.   if g=15 then put .0571 into w
  322.   if g=16 then put .0508 into w
  323.   if g=17 then put .0453 into w
  324.   if g=18 then put .0403 into w
  325.   if g=19 then put .0359 into w
  326.   if g=20 then put .0320 into w
  327.   if g=21 then put .0285 into w
  328.   if g=22 then put .0253 into w
  329.   if g=23 then put .0226 into w
  330.   if g=24 then put .0201 into w
  331.   if g=25 then put .0179 into w
  332.   if g=26 then put .0159 into w
  333.   if g=27 then put .0142 into w
  334.   if g=28 then put .0126 into w
  335.   if g=29 then put .0113 into w
  336.   if g=30 then put .0100 into w
  337.   if g=31 then put .00893 into w
  338.   if g=32 then put .00795 into w
  339.   if g=33 then put .00708 into w
  340.   if g=34 then put .00630 into w
  341.   if g=35 then put .00561 into w
  342.   if g=36 then put .00500 into w
  343.   if g=37 then put .00445 into w
  344.   if g=38 then put .00397 into w
  345.   if g=39 then put .00353 into w
  346.   if g=40 then put .00314 into w
  347.   if w=0 or Round(g)<>g then
  348.     put "Error" into  card field 11
  349.     put "Error" into  card field 12
  350.   end if
  351.   if w<>0 then
  352.     set numberformat to "0.0000"
  353.     put w&"  in" into card field 11
  354.     set numberformat to "0.000"
  355.     put w*25.4&"  mm" into card field 12
  356.   end if
  357. end mouseUp
  358.  
  359.  
  360.  
  361. -- part 43 (field)
  362. -- low flags: 01
  363. -- high flags: 0002
  364. -- rect: left=371 top=140 right=159 bottom=434
  365. -- title width / last selected line: 0
  366. -- icon id / first selected line: 0 / 0
  367. -- text alignment: 1
  368. -- font id: 0
  369. -- text size: 12
  370. -- style flags: 0
  371. -- line height: 16
  372. -- part name: 
  373.  
  374.  
  375. -- part 45 (field)
  376. -- low flags: 01
  377. -- high flags: 0002
  378. -- rect: left=325 top=159 right=179 bottom=399
  379. -- title width / last selected line: 0
  380. -- icon id / first selected line: 0 / 0
  381. -- text alignment: 1
  382. -- font id: 0
  383. -- text size: 12
  384. -- style flags: 0
  385. -- line height: 16
  386. -- part name: 
  387.  
  388.  
  389. -- part 46 (field)
  390. -- low flags: 01
  391. -- high flags: 0002
  392. -- rect: left=410 top=159 right=179 bottom=488
  393. -- title width / last selected line: 0
  394. -- icon id / first selected line: 0 / 0
  395. -- text alignment: 1
  396. -- font id: 0
  397. -- text size: 12
  398. -- style flags: 0
  399. -- line height: 16
  400. -- part name: 
  401.  
  402.  
  403. -- part 48 (field)
  404. -- low flags: 01
  405. -- high flags: 0002
  406. -- rect: left=377 top=278 right=297 bottom=440
  407. -- title width / last selected line: 0
  408. -- icon id / first selected line: 0 / 0
  409. -- text alignment: 1
  410. -- font id: 0
  411. -- text size: 12
  412. -- style flags: 0
  413. -- line height: 16
  414. -- part name: 
  415.  
  416.  
  417. -- part 49 (field)
  418. -- low flags: 01
  419. -- high flags: 0002
  420. -- rect: left=328 top=297 right=317 bottom=402
  421. -- title width / last selected line: 0
  422. -- icon id / first selected line: 0 / 0
  423. -- text alignment: 1
  424. -- font id: 0
  425. -- text size: 12
  426. -- style flags: 0
  427. -- line height: 16
  428. -- part name: 
  429.  
  430.  
  431. -- part 50 (field)
  432. -- low flags: 01
  433. -- high flags: 0002
  434. -- rect: left=413 top=297 right=317 bottom=491
  435. -- title width / last selected line: 0
  436. -- icon id / first selected line: 0 / 0
  437. -- text alignment: 1
  438. -- font id: 0
  439. -- text size: 12
  440. -- style flags: 0
  441. -- line height: 16
  442. -- part name: 
  443.  
  444.  
  445. -- part 59 (button)
  446. -- low flags: 00
  447. -- high flags: 0000
  448. -- rect: left=448 top=258 right=274 bottom=465
  449. -- title width / last selected line: 0
  450. -- icon id / first selected line: 0 / 0
  451. -- text alignment: 1
  452. -- font id: 0
  453. -- text size: 12
  454. -- style flags: 0
  455. -- line height: 16
  456. -- part name: 
  457.  
  458.  
  459. -- part 60 (button)
  460. -- low flags: 00
  461. -- high flags: 0000
  462. -- rect: left=471 top=259 right=271 bottom=483
  463. -- title width / last selected line: 0
  464. -- icon id / first selected line: 0 / 0
  465. -- text alignment: 1
  466. -- font id: 0
  467. -- text size: 12
  468. -- style flags: 0
  469. -- line height: 16
  470. -- part name: 
  471.  
  472.  
  473. -- part contents for card part 35
  474. ----- text -----
  475. 0.1875  in
  476.  
  477. -- part contents for card part 36
  478. ----- text -----
  479. 4.762  mm
  480.  
  481. -- part contents for card part 2
  482. ----- text -----
  483. 7
  484.  
  485. -- part contents for card part 38
  486. ----- text -----
  487. 20
  488.  
  489. -- part contents for card part 39
  490. ----- text -----
  491. 0.0368  in
  492.  
  493. -- part contents for card part 40
  494. ----- text -----
  495. 0.934  mm
  496.  
  497. -- part contents for card part 43
  498. ----- text -----
  499. 12
  500.  
  501. -- part contents for card part 45
  502. ----- text -----
  503. 0.1111  in
  504.  
  505. -- part contents for card part 46
  506. ----- text -----
  507. 2.821  mm
  508.  
  509. -- part contents for card part 48
  510. ----- text -----
  511. 26
  512.  
  513. -- part contents for card part 49
  514. ----- text -----
  515. .0159  in
  516.  
  517. -- part contents for card part 50
  518. ----- text -----
  519. 0.404  mm
  520.  
  521. -- part contents for background part 5
  522. ----- text -----
  523. 1 --,gage,gages,guage,guages,g,sheet metal gage,wrought iron gage,
  524. 4 --,gage,gages,guage,guages,g,sheet metal gage,steel gage,
  525. 7 --,gage,gages,guage,guages,g,galvanized steel gage,galvanized steel gages,sheet metal gages,gs gage,gs gages,galvanized metal gage,galvanized metal gages,galvanized,gi gage,gi gages,galvanized iron gage,galvanized iron gages,
  526. 10 --,wire gage,wire gages,steel wire gage,steel wire gages,wire,wires,gage,gages,guage,guages,
  527. 11 
  528. 12